/*
 *  statement/switch_case.c
 *
 *  (C) 2011 Harry Wei
 */

#include <stdio.h>
#include <stdlib.h>

#define err(code, fmt, arg...)                  \
	do {                                    \
		fprintf(stderr, fmt, ##arg);    \
		exit(code);                     \
	} while (0)

#define PRINT(fmt, arg...) {			\
		if (a) {			\
			printf(fmt, ##arg)	\
		}				\
}

int main(void)
{
	char a = 'a';

	switch (a) {
	case 'A' ... 'Z':
		printf("A---Z\n");
		break;
	case 'a' ... 'z':
		printf("a---z\n");
		break;
	case '0' ... '9':
		printf("0---9\n");
		break;
	default:
		break;
	}
	/* err(1, "This is GNU-C!\n"); */
	err(1, "%c\n", a);
	return 0;
}
